<template>
<div class="top">
  <div class="showSlider-breadcrumb">
    <div @click="changeShowSlider" class="showSlider">
      <i class="el-icon-s-fold" v-show="showSliderGetters"></i>
      <i class="el-icon-s-unfold" v-show="!showSliderGetters"></i>
    </div>
    <breadcrumb></breadcrumb>
  </div>
  
  <head-portrait></head-portrait>
</div>
</template>

<script>
import breadcrumb from './breadcrumb'
import headPortrait from './head-portrait'
import {mapGetters, mapMutations} from 'vuex'

export default {
  name: 'index',
  components: {
    breadcrumb,
    headPortrait
  },
  methods: {
    ...mapMutations([
      'changeShowSlider'
    ])
  },
  computed: {
    ...mapGetters([
      'showSliderGetters'
    ])
  }
}
</script>

<style scoped>
  .top {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  }

  .showSlider-breadcrumb {
    display: flex;
    align-items: center;
  }

  .showSlider {
    margin-right: 20px
  }
</style>
